﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"  AutoEventWireup="true" CodeBehind="MyPage.aspx.cs" Inherits="BlackEagleClient.MyPage" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div id="friendRequests">
    <asp:Label ID="lblFriendRequests" runat="server" Text="<%$ Resources:Resource, lblFriendRequests %>"></asp:Label><br /><hr />
<asp:DataList ID="requests" runat="server" meta:resourcekey="myFriendsResource1">
   
    <ItemTemplate> 
    <tr>
    <td>       
    <img src='<%# CheckImg(((string)Eval("PictureUrl")), ((int)Eval("Sex"))) %>' alt="NO PIC" class="friendPic"  />     
    </td>
    <td>
    <asp:HyperLink ID="HyperLink1"
     Text='<%# Eval("Fnamn")+ " " +Eval("Enamn") %>'
     NavigateUrl='<%# "Profile.aspx?id=" + Eval("ID") %>'
     runat="server" meta:resourcekey="HyperLink1Resource1"></asp:HyperLink>
    </td>
    <td>
        <asp:Button ID="btnAccept" runat="server"   Text="<%$ Resources:Resource, btnAccept %>"  OnCommand="btnAccept_Command" CommandArgument = '<%# Eval("ID") %>'  />
        <asp:Button ID="btnDecline" runat="server"   Text="<%$ Resources:Resource, btnDecline %>"  OnCommand="btnDecline_Command" CommandArgument = '<%# Eval("ID") %>' />    
    </td> 
     </tr>
    </ItemTemplate>
    </asp:DataList>
</div>
<div id="friends">
    <asp:Label ID="lblFriends" runat="server" Text="<%$ Resources:Resource, lblFriends %>"></asp:Label><br /><hr />
    <asp:DataList ID="myFriends" runat="server" meta:resourcekey="myFriendsResource1">
    <ItemTemplate>
    <tr>

    <td>
    
    
    <img src='<%# CheckImg(((string)Eval("PictureUrl")), ((int)Eval("Sex"))) %>' alt="NO PIC" class="friendPic"  />
    
    
  
    </td>

    <td>
    <asp:HyperLink ID="HyperLink1"
     Text='<%# Eval("Fnamn")+ " " +Eval("Enamn") %>'
     NavigateUrl='<%# "Profile.aspx?id=" + Eval("ID") %>'
     runat="server" meta:resourcekey="HyperLink1Resource1"></asp:HyperLink>
    </td>
    
    
    
     </tr>

     

     
   
    </ItemTemplate>
    </asp:DataList>
    </div>


    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <div id="profile">
    <asp:DataList ID="myProfile" runat="server" meta:resourcekey="myProfileResource1">
    <ItemTemplate>

    <p> <a href="<%# "Profile.aspx?id=" + Eval("ID") %>"><asp:Literal ID="myProfile" runat="server" Text="<%$ Resources:Resource, myProfile%>" /></a> </p>

       <img src='<%# CheckImg(((string)Eval("PictureUrl")), ((int)Eval("Sex"))) %>' 
            class="profilePic" alt='bilden ej hittas kanske' > <a href="EditProfile.aspx"><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Resource, editProfile%>" /></a>
        
        
                 <br />

       <asp:Label ID="lblName" runat="server"  Text="<%$ Resources:Resource, lblName %>" > </asp:Label><%# Eval("Fnamn") %> <%# Eval("Enamn") %> <br />
       <asp:Label ID="lblSex" runat="server"  Text="<%$ Resources:Resource, lblSex %>" > </asp:Label> <%# GetSex(((int)Eval("Sex")))%><br />
       <asp:Label ID="lblAge" runat="server"  Text="<%$ Resources:Resource, lblAge %>" > </asp:Label> <%# CalculateAge(((DateTime)Eval("BirthDate"))) %> <br />
       <asp:Label ID="lblEmail" runat="server"  Text="<%$ Resources:Resource, lblEmail %>" > </asp:Label> <%# Eval("Email") %> <br />
       <asp:Label ID="lblMemberType" runat="server"   Text="<%$ Resources:Resource, lblMemberType %>"></asp:Label> <%# Roles.GetRolesForUser(User.Identity.Name).First() %><br />
        <br />
       <asp:Label ID="lblPersonalDesc" runat="server"  Text="<%$ Resources:Resource, lblPersonalDesc %>"></asp:Label> <br />
        <%# Eval("PersonalDesc") %>
        
     

    </ItemTemplate>
    </asp:DataList>
    </div>

    
    
    
</asp:Content>
